---
import ContentBox from './ContentBox.astro'
---
<ContentBox>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4" th:with="data=${@commonTag.toJson(article.articleContent)},photoList=${data.photoData},photoTotal=${#lists.size(photoList)}">
    <div class="grid gap-4" th:each="i : ${#numbers.sequence(0, (photoTotal-1)/3)}">
        <div th:each="j : ${#numbers.sequence(0, i==photoTotal/3?(photoTotal%3-1):2)}" th:with="photoData=${photoList[i*3+j]}">
            <img th:src="${imgPrefix+photoData.url}" class="h-auto max-w-full rounded-lg" th:alt="${photoData.name}" />
        </div>
    </div>
</div>
</ContentBox>